package com.cn.tcc;

import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@LocalTCC

public interface StorageTCCAction {
    @TwoPhaseBusinessAction(name = "StorageTCCAction")
    boolean prepare(BusinessActionContext ctx,
                    @BusinessActionContextParameter(paramName = "productId") Long productId,
                    @BusinessActionContextParameter(paramName = "count") Integer count);
    boolean commit(BusinessActionContext ctx);
    boolean rollback(BusinessActionContext ctx);
}
